perm filename 4[00,BGB]1 blob
sn#041495 filedate 1973-05-15 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00011 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 III. USING TVFONT.
C00004 00003 TVFONT PRIMER.
C00008 00004 TVFONT PRIMER: FIRST EXPLANATION.
C00011 00005 Polygon Killing.
C00012 00006 Data Structure:
C00014 00007 TVFONT COMMAND SUMMARY
C00016 00008 TVFONT COMMAND SUMMARY
C00018 00009 TVFONT COMMAND SUMMARY
C00020 00010 SUMMARY OF TVFONT'S EXTENDED COMMANDS.
C00022 00011 TVFONT NODE FORMATS.
C00025 ENDMK
C⊗;
III. USING TVFONT.
Introduction.
TVFONT is a version of CRE (January 1973) that was
specialized to the task of converting television images into type
fonts for the XGP, Xerox Graphics Printer. My original idea was to
demonstrate the utility of a polygon representation for scaling,
smoothing and editing typographical glyphs; the resulting hack
(demonstration program) was extended and developed by Tovar Mock
into the program called TVFONT. Accordingly, the main idea of TVFONT
is to convert video rasters into polygons, to edit and scale the
polygons, and to convert the polygons back into bit rasters.
TVFONT PRIMER.
TVFONT is on the system, and can be run by typing "R TVFONT"
at a III display console. At present, III #23 is next to a camera
setup for making fonts. The process of making a new XGP font or
altering an old one will be explained several times in six steps:
1. Raster input: get a video image or an old font.
2. Contouring: make polygons.
3. Polygon editing: delete, scale, position and alter.
4. Polygon I/O: save and restore polygons.
5. Font output: make new font and output font file.
Complexity arises in that there is more than one way to do
each step, there are default arguments and switchs which the user
may alter, there are ways to save and restore intermediate results,
and there are quite afew different display modes and display
diagonostics. The TVFONT command scanner resembles that of TVED and
E; (as well as CRE and GEOMED); the command scanner types an
asterisk "*" when it is in its top most listen loop waiting for a
single command character. The command character may be modified by
the META and CONTROL keys which will be abbreviated as "α", "β" and
"ε" for CONTROL, META, and META-CONTROL respectively. Many commands
in turn require arguments such as numbers or file names. Finally the
"X" command waits for an extended command name of several
characters, which is called an extended command.
TVFONT PRIMER: FIRST EXPLANATION.
This first explanation will present a way of making a new
font using the fewest commands.
Raster Input and Contouring.
1. "T" take television picture.
2. "H" Display histogram of television picture.
3. "C24" Cut at intensity level 24.
Get the Font Camera looking at a single letter in a font
book. Use a black piece of paper with a square cut out as a mask to
isolate the letter. The "T" command will take a television picture.
The "H" command will display a histogram of the television picture,
showing how many points of the image were 0 intensity, (total black)
and how many points of the image were 77 intensity, (total white). A
picture of a black glyph on a white background surrounded by a black
mask should yield a histogram with two peaks.
Next the "C" command followed by an octal number followed by
a carriage return; contours the image at the given octal intensity
cut threshold. That is all the points of the image above the
threshold are inside of a polygon. The intensity value of the
lowest valley between the two peaks of the histogram is probably the
best cut value (and is probably the octal number 24 or 30). The cut
command, will display the polygons that are made.
Polygon Killing.
4. "ε+" Fetch first polygon of first image of the film.
5. "K" Kill a polygon.
6. "." ring around the polygons of an image.
7. "!" flush node display.
Making and Outputing a Font File.
8. "X"center Center all the images of the film.
9. "Q" Make font bit rasters.
10. "εO" Output font file.
Testing a new Font File.
11. .xGP FILE/FONT=NEWFNT.FNT[XGP,BGB]
Data Structure:
The internal data structure of TVFONT is a modification of
Baumgart's CRE structure (Contour Region Edge). The basic structure
is a doubly-linked ring of fixed size nodes. These nodes contain
links, numbers, type and relocation information. Nodes are
explicitly returned to the empty node list hence garbage collection
is not necessary, but there is a compactor which reduces the size of
node space by moving empty nodes to the top of core.
Basic node types:
The basic node types used in TVFONT are film, image,
polygon, vertex, and arc. In addition, the node type SEGMENT is
used by the scan convertor on a temperary basis.
The lowest level node is the VERTEX node, which contains a
row and column number, a pointer to its owner, and possibly a
SEGMENT. An ARC is a type of VERTEX which results from smoothing a
VIC (Video Intensity Contour, which is a set of vertices which
represent an intensity contour in the TV picture from which it was
derived). At the current time, arcs are straight lines but it is
hoped that they will eventually represent curves.
TVFONT COMMAND SUMMARY
A ASSIGN ASCII CODE TO IMAGE.
B EXPAND/CONTRACT BY CONSTANT
αB EXPAND/CONTRACT IN Y DIRECTION
βB EXPAND/CONTRACT IN X DIRECTION
εB SLANT CHARACTER (1/2 SLANTS TO 45 DEGREE ANGLE)
C MAKE THRESHOLD CUT.
εC MAKE POLYGON IMAGE OUT OF BIT REPRESENTATION OF FONT.
D ENABLE/DISABLE DELETION OF BABY POLYGONS (DEFAULT IS OFF).
F LOCATE NEAREST POINT, εF USE LIGHT PEN
G LEVEL OF CORRESPONDING CHARACTER CODE
H HISTOGRAM, "αH" ,"βH" BI-MODAL CUT.
I INPUT TV PICTURE FROM DISK.
αI INPUT CRE FILE
K KILL POLYGON OR VERTEX
L SHOW LAST BIT IMAGE
αL SHOW CHARACTER FROM FONT IN FNTSEG
M MOVE POLYGON TO NEXT IMAGE.
αM MOVE TO NEW IMAGE
βM MIDPOINT LINE
εM MUNG ONTO GRID POINT (AS SEEN IN εY)
N NEXT IMAGE
αN PREVIOUS IMAGE
βN REPEAT NEXT IMAGE UNTIL A CHARACTER IS TYPED
εN REPEAT PREVIOUS IMAGE UNTIL A CHARACTER IS TYPED
TVFONT COMMAND SUMMARY
O OUTPUT CAREYE FILE.
αO OUTPUT CRE FILE
εO OUTPUT FONT FILE
P PLOT OUTPUT FILE.
Q MAKE FONT
αQ MAKE 1/2 SIZE FONT
R DISPLAY BIT MATRIX FOR THIS CHARACTER.
αR ROTATE IMAGE, LEVEL OR POLYGON (ANGLE IN RADIANS)
S SMOOTH
αS SMOOTH AND KILL VIDEO INTENSITY CONTOUR
βS REPEAT 'S' FOR EACH IMAGE
εS REPEAT 'αS' FOR EACH IMAGE
T TAKE A TV PICTURE
V CREATE VERTEX AT CENTER
αV CREATE NEW VERTEX AT CURRENT VERTEX
βV CREATE NEW VERTEX IN NEW IMAGE
W CENTER IN THE WINDOW.
αW CENTER Y-POSITION ONLY.
βW CENTER X-POSITION ONLY.
εW MOVE POINT SPECIFIED BY LIGHT PEN TO CENTER.
X XTEND MODE COMMANDS
Y DISPLAY SMOOTHED FORM
βY DISPLAY VIDEO INTENSITY CONTOUR
αY DISPLAY BOTH OF ABOVE
εY DISPLAY VIDEO INTENSITY CONTOUR MUNGED ONTO PIXELS
Z ZERO DATA BUFFERS.
αZ RESET LOGICAL CAMERA POSITION
βZ RESET DISPLAY
TVFONT COMMAND SUMMARY
+ Fetch film node.
α+ Fetch first image node from film.
β+ Fetch first level from film.
ε+ Fetch first polygon from film.
IF A NODE IS CURRENTLY BEING DISPLAYED, THESE COMMANDS AFFECT THAT NODE,
OTHERWISE THEY AFFECT THE CAMERA (VIEWERS) POSITION. <CONTROL> MULTIPLIES
BY 2, <META> MULTIPLIES BY 4.
; MOVE LEFT (←) BY DELTA
: MOVE RIGHT (→) BY DELTA
( MOVE UP BY DELTA
) MOVE DOWN BY DELTA
/ DIVIDE DELTA BY 2
\ MULTIPLY DELTA BY 2
THESE COMMANDS AFFECT THE CAMERA (VIEWERS) POSITION.
* INCREASE MAGNIFICATION BY DELTA
- DECREASE MAGNIFICATION BY DELTA
THESE COMMANDS CHANGE NODE BEING DISPLAYED.
. FETCH COUNTER CLOCKWISE NODE IN RING.
, FETCH CLOCKWISE NODE IN RING.
< FETCH FATHER OF NODE
> FETCH SON OF NODE
≤ FETCH ARC [OF POLYGON OR VERTEX]
→ FETCH POLYGON [OF VERTEX]
∧ EQUIVALENT TO '<,>'
∨ EQUIVALENT TO '<.>'
! FLUSH NODE DISPLAY
THESE COMMANDS AFFECT THE PUSHDOWN LIST
∪ PUSH NODE BEING DISPLAYED ONTO STACK
∩ POP NODE OFF STACK AND DISPLAY IT
↔ SWAP NODE BEING DISPLAYED WITH TOP OF STACK
SUMMARY OF TVFONT'S EXTENDED COMMANDS.
XEROX OUTPUT TV IMAGE TO XGP
HELP DESCRIBE XTENDED FUNTIONS
DDT INVOKE DDT IF PRESENT, RETURN WITH αP
EXIT EXIT TO MONITER
ARCWID SET CONSTANT FOR SMOOTHING
DISPLA TURN ON DISPLAY
-DISPL TURN OFF DISPLAY
KILVIC FLUSH PRE-SMOOTHING LINES
GRID TURN ON GRID
-GRID TURN OFF GRID
CAMERA SELECT CAMERA, "αS" BCLIP, "βS" TCLIP.
KILARC KILL ARC VECTORS
CENTER CENTER ALL IMAGES
POPJ LEAVE TTY LOOP
BABYKI TOGGLE FLAG WHICH BABY POLYGONS
SCALE SCALE ALL IMAGES BY CONSTANT
xSCALE SCALE IN X ALL IMAGES BY CONSTANT
YSCALE SCALE IN Y ALL IMAGES BY CONSTANT
SLANT SLANT ALL IMAGES BY CONSTANT
MUNG FORCE VECTICES OF CURRENT POLYGON OR LEVEL ONTO PIXEL BOUNDARIES
POLYGO MAKE HOLE INTO POLYGON
HOLE MAKE POLYGON INTO HOLE
SORT SORT IMAGES ON FILM ACCORDING TO ASCII CODE
READFO READ FONT FILE INTO POLYGON REPRESENTATION
TVFONT NODE FORMATS.
________________________________________________________________
| |
| VERTEX/ARC NODE. POLYGON/REGION NODE. |
| |
| 0 VERTEX-RING 0 POLYGON-RING. |
| 1 ROW,,COL 1 DAD,,SON |
| 2 TYPE,,RELOC 2 TYPE,,RELOC |
| 3 - ,, - 3 - ,, - |
| 4 ARC,, - 4 ARC,,NCNT |
| 5 - ,,PGON 5 - ,,PGON |
| 6 RT SEG,,LT SEG 6 - ,, - |
|________________________________________________________________|
| |
| IMAGE NODE. LEVEL NODE. |
| |
| 0 IMAGE-RING 0 LEVEL-RING |
| 1 - ,,SON 1 - ,,SON |
| 2 TYPE,,RELOC 2 TYPE,,RELOC |
| 3 - ,, - 3 - ,, - |
| 4 - ,, - 4 - ,,NCNT |
| 5 - ,, - 5 - ,, - |
| 6 - ,, - 6 - ,, - |
|________________________________________________________________|
| |
| FILM NODE. EMPTY NODE. |
| |
| 0 CORESIZE 0 - ,,AVAIL |
| 1 - ,,SON 1 - ,, - |
| 2 TYPE,,RELOC 2 TYPE,,RELOC |
| 3 - ,,AVAIL 3 - ,, - |
| 4 BLOCK COUNT 4 - ,, - |
| 5 - ,, - 5 - ,, - |
| 6 - ,, - 6 - ,, - |
|________________________________________________________________|
| |
| SEGMENT NODE. |
| 0 SEGMENT RING |
| 1 - ,, - |
| 2 TYPE,,300003 |
| 3 LDEL,,RDEL |
| 4 LCOL,,RCOL |
| 5 LROW,,RROW |
| 6 LT,,RT |
|________________________________________________________________|